﻿using UnityEngine;
using System.Collections;
namespace stickman
{
public class playercontroller : MonoBehaviour {
		public GameObject bridge_obj;
		public GameObject touchodown_obj;
		public static bool isGreateBridge;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetKeyDown (KeyCode.Mouse0)) {
				isGreateBridge=true;
				bridge_obj.SetActive(true);
				//Instantiate(bridge_obj,new Vector3(transform.position.x+3,transform.position.y,transform.position.z),Quaternion.identity);
		}
		if(Input.GetKeyUp(KeyCode.Mouse0)){
				isGreateBridge=false;
					Instantiate(touchodown_obj,new Vector3(transform.position.x+2,transform.position.y,transform.position.z),Quaternion.identity);
	
		}
	}
}
}
